package com.exprecards.common.util;

import com.xml.configurator.xml.Configurator;

public class ReportUtil {

	private static String server = Configurator.getInstance().getString("common","server_runtime_report", "198.38.88.235");
    private static String port = Configurator.getInstance().getString("common","port_runtime_report", "8080");
    
	/**
	 * @param reportes Es la lista de los repostes que se desean construir.
	 * @return C�digo JavaScript a ejecutar.
	 */
	public static String build(String reporte){
		
		String javaScriptExec = "";
		
			javaScriptExec += "javascript:window.open('"; 
			javaScriptExec +=  "http://" +
			server + ":" + 
			port + "/" + 
			"EXPRECARDSBI" + "/" + 
			"frameset" + "?" + 
			"__report" + "=" + reporte + "." + 
			"rptdesign";
			
			javaScriptExec += "','',"+"'"+ "left=10,top=20,width=900,height=600,resizable=1,scrollbars=1" +"');";
		
		
		return javaScriptExec;
	}
	
}
